package net.maku.generator;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.ConfigurableEnvironment;

import java.net.InetAddress;
import java.net.UnknownHostException;

/**
 * 代码生成器
 *
 * @author 阿沐 babamu@126.com
 * <a href="https://maku.net">MAKU</a>
 */
@SpringBootApplication
public class GeneratorApplication {

    public static void main(String[] args) throws UnknownHostException {
        ConfigurableApplicationContext run = SpringApplication.run(GeneratorApplication.class, args);
        ConfigurableEnvironment environment = run.getEnvironment();
        System.out.println("启动成功，文档地址：http://" + InetAddress.getLocalHost().getHostAddress() + ":" + environment.getProperty("server.port") + "/maku-generator/index.html");
    }
}
